package dao;

import entity.Appointments;
import entity.RescheduleNotifications;
import entity.vo.AppointmentsData;
import entity.vo.DoctorsGetAppointments;

import java.util.List;

/**
 * (Appointments)表数据库访问层
 *
 * @author makejava
 * @since 2024-04-22 12:33:38
 */

//涉及到修改预约数据的接口都要对RescheduleNotifications进行改动!!!
public interface AppointmentsDao {

    int booking(Appointments appointments);

    //用户查询预约记录
    List<AppointmentsData> queryByUserId(Integer userId);


    //医生查询收到预约记录
    List<DoctorsGetAppointments> queryByDoctorsId(Integer doctorsId);

    List<DoctorsGetAppointments> queryOkByDoctorsId(Integer doctorsId);

    /**
     * @param rescheduleNotifications 实例对象
     * @return 影响行数
     * 根据id修改预约的"时间"
     */
    //修改预约时间
    boolean updateTime(RescheduleNotifications rescheduleNotifications);

    //取消预约
    int cancelById(Integer id);

    //确认接收预约
    int confirmById(Integer id);

    //删除预约(管理员)
    int deleteById(Integer id);

}

